package com.baox.agridata.synchronous.service.business.impl;


import com.baox.agridata.synchronous.entity.quanguo.Jyzscpb;
import com.baox.agridata.synchronous.entity.quanguo.Jyzsdwb;
import com.baox.agridata.synchronous.service.business.AsyncLogOperationService;
import com.baox.agridata.synchronous.service.quanguo.JyzscpaService;
import com.baox.agridata.synchronous.service.quanguo.JyzscpbService;
import com.baox.agridata.synchronous.service.quanguo.JyzsdwaService;
import com.baox.agridata.synchronous.service.quanguo.JyzsdwbService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AsyncLogOperationServiceImpl implements AsyncLogOperationService {


    @Autowired
    private JyzsdwaService jyzsdwaService;   //本省动物A发送

    @Autowired
    private JyzsdwbService jyzsdwbService;   //本省动物B发送

    @Autowired
    private JyzscpaService jyzscpaService;   //本省产品A发送

    @Autowired
    private JyzscpbService jyzscpbService;   //本省产品B发送

    @Async("newAsyncExecutor")
    @Override
    public void batchInsertJyzsdwaBak(List<Jyzsdwb> list) {
        jyzsdwaService.batchInsertJyzsdwabak(list);
    }

    @Async("newAsyncExecutor")
    @Override
    public void batchInsertJyzsdwbBak(List<Jyzsdwb> list) {
        jyzsdwbService.batchInsertJyzsdwbBak(list);
    }

    @Async("newAsyncExecutor")
    @Override
    public void batchInsertJyzscpaBak(List<Jyzscpb> list) {
        jyzscpaService.batchInsertJyzscpaBak(list);
    }


    @Async("newAsyncExecutor")
    @Override
    public void batchInsertJyzscpbBak(List<Jyzscpb> list) {
        jyzscpbService.batchInsertJyzscpbBak(list);
    }





}
